<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">
		<title>登录</title>
		<script type='text/javascript' src='dwr/interface/loginService.js'></script>
		<script type='text/javascript' src='dwr/engine.js'></script>
		<script type='text/javascript' src='dwr/util.js'></script>
		<script type="text/javascript">
			
			
			function sub_mit(date){
			
				if(date!=1){
					
				    dwr.util.setValue('result',"无法找到用户："+myform.userName.value);
				    return;
				    
				}else{
				
				document.myform.action = "<c:url value="login.html"/>";
				document.myform.submit();}
			}
			function find(){
				loginService.getMacthCount(myform.userName.value,myform.password.value,sub_mit);
				
			}
		</script>
	<!-- alert("无法找到用户："+myform.userName.value+"相关信息!!") -->
	</head>

	<body>
		<!--
		<c:if test="${!empty error}">
			<font color="red"><c:out value="${error}"></c:out> </font>
		</c:if>
		  -->
		 <div id="result"></div>
		 
		<form  name="myform" action="" method="post">
			用户名:
			<input type="text" name="userName">
			<br>
			密码:
			<input type="password" name="password">
			<br>
			<input type="button" value="登录" onclick="javascript:find()"/>
			<input type="reset" value="重置" />
		</form>

	</body>
</html>
